/*
 * @Author: your name
 * @Date: 2022-01-19 14:52:44
 * @LastEditTime: 2022-01-24 11:12:43
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \vue-element-admin\src\store\modules\division.js
 */
import { customerAdd , customerEdit,customerList,customerSelOne,customerChange,customerApplyList,customerManyEdit,customerPool,customerLinkmanId} from '@/api/customer'

const state = {
 
}

const mutations = {
 
}

const actions = {
    customerAdd({ commit }, formData) {
    return new Promise((resolve, reject) => {
        customerAdd(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  customerEdit({ commit }, formData) {
    return new Promise((resolve, reject) => {
        customerEdit(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  customerSelOne({ commit }, formData) {
    return new Promise((resolve, reject) => {
        customerSelOne(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  customerList({ commit }, formData) {
    return new Promise((resolve, reject) => {
        customerList(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  customerChange({ commit }, formData) {
    return new Promise((resolve, reject) => {
      customerChange(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  customerApplyList({ commit }, formData) {
    return new Promise((resolve, reject) => {
      customerApplyList(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  customerManyEdit({ commit },formData) {
    return new Promise((resolve, reject) => {
      customerManyEdit(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  customerPool({ commit },formData) {
    return new Promise((resolve, reject) => {
      customerPool(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
  customerLinkmanId({ commit },formData) {
    return new Promise((resolve, reject) => {
      customerLinkmanId(formData).then(response => {
        // const { data } = response
        resolve(response)
      }).catch(error => {
        reject(error)
      })
    })
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
